<div class="row" ng-show="running">
	<div class="col-lg-12">
		<div class="alert alert-info" ng-bind="running"></div>
	</div>
</div>
<div class="row" ng-show="success">
	<div class="col-lg-12">
		<div class="alert alert-success" ng-bind="success"></div>
	</div>
</div>
<div class="row" ng-show="error">
	<div class="col-lg-12">
		<div class="alert alert-danger" ng-bind="error"></div>
	</div>
</div>
<div class="row">
	<div class="col-sm-12">
		<form class="form-horizontal">
			<div class="col-sm-6">
				<div class="form-group">
					<label class="control-label col-sm-2">Metric</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" ng-model="metric" ng-options="m for m in metrics" ng-change="GetTagKByMetric()" limit="30" bs-typeahead>
					</div>
				</div>
			</div>
			<div class="col-sm-6">
				<button class="btn btn-primary" ng-click="Submit()">Submit</button>
			</div>
		</form>
	</div>
</div>
<div class="row">
	<div class="col-sm-12">
		<div class="col-sm-6">
			<h3>Datapoints</h3>
			<div class="form-horizontal" ng-repeat="(k, v) in dps">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-2 control-label">Time</label>
						<div class="col-sm-10">
							<input class="form-control" type="text" ng-model="dps[k].k" ng-change="AddDP()">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-2 control-label">Value</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" ng-model="dps[k].v" ng-change="AddDP()">
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="col-sm-6">
			<h3>Tags</h3>
			<div class="form-horizontal" ng-repeat="t in tags">
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-2 control-label">Key</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" ng-model="tags[$index].k" ng-change="AddTag()">
						</div>
					</div>
				</div>
				<div class="col-sm-6">
					<div class="form-group">
						<label class="col-sm-2 control-label">Value</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" ng-model="tags[$index].v" ng-change="AddTag()">
						</div>
					</div><div class="col-sm-10"></div>
				</div>
			</div>
		</div>
	</div>
</div>